<!doctype html>
<html lang="en">
<head>
    <title>Code coverage report for src/scroll/scrollbar.js</title>
    <meta charset="utf-8" />
    <link rel="stylesheet" href="../../prettify.css" />
    <link rel="stylesheet" href="../../base.css" />
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <style type='text/css'>
        .coverage-summary .sorter {
            background-image: url(../../sort-arrow-sprite.png);
        }
    </style>
</head>
<body>
<div class='wrapper'>
  <div class='pad1'>
    <h1>
      <a href="../../index.html">all files</a> / <a href="index.html">src/scroll/</a> scrollbar.js
    </h1>
    <div class='clearfix'>
      <div class='fl pad1y space-right2'>
        <span class="strong">9.25% </span>
        <span class="quiet">Statements</span>
        <span class='fraction'>21/227</span>
      </div>
      <div class='fl pad1y space-right2'>
        <span class="strong">0% </span>
        <span class="quiet">Branches</span>
        <span class='fraction'>0/96</span>
      </div>
      <div class='fl pad1y space-right2'>
        <span class="strong">3.33% </span>
        <span class="quiet">Functions</span>
        <span class='fraction'>1/30</span>
      </div>
      <div class='fl pad1y space-right2'>
        <span class="strong">9.25% </span>
        <span class="quiet">Lines</span>
        <span class='fraction'>21/227</span>
      </div>
    </div>
  </div>
  <div class='status-line low'></div>
<pre><table class="coverage">
<tr><td class="line-count quiet">1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407</td><td class="line-coverage quiet"><span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">import { style, addEvent, removeEvent } from '../util/dom'
import { getNow } from '../util/lang'
import { ease } from '../util/ease'
&nbsp;
const INDICATOR_MIN_LEN = 8
&nbsp;
export function scrollbarMixin(BScroll) {
  BScroll.prototype._initScrollbar = function () <span class="fstat-no" title="function not covered" >{</span>
    const {fade = true, interactive = false} = <span class="cstat-no" title="statement not covered" >this.options.scrollbar</span>
<span class="cstat-no" title="statement not covered" >    this.indicators = []</span>
    let indicator
&nbsp;
<span class="cstat-no" title="statement not covered" >    if (this.options.scrollX) {</span>
<span class="cstat-no" title="statement not covered" >      indicator = {</span>
        el: createScrollbar('horizontal'),
        direction: 'horizontal',
        fade,
        interactive
      }
<span class="cstat-no" title="statement not covered" >      this._insertScrollBar(indicator.el)</span>
&nbsp;
<span class="cstat-no" title="statement not covered" >      this.indicators.push(new Indicator(this, indicator))</span>
    }
&nbsp;
<span class="cstat-no" title="statement not covered" >    if (this.options.scrollY) {</span>
<span class="cstat-no" title="statement not covered" >      indicator = {</span>
        el: createScrollbar('vertical'),
        direction: 'vertical',
        fade,
        interactive
      }
<span class="cstat-no" title="statement not covered" >      this._insertScrollBar(indicator.el)</span>
<span class="cstat-no" title="statement not covered" >      this.indicators.push(new Indicator(this, indicator))</span>
    }
&nbsp;
<span class="cstat-no" title="statement not covered" >    this.on('refresh', () =&gt; <span class="fstat-no" title="function not covered" >{</span></span>
<span class="cstat-no" title="statement not covered" >      for (let i = 0; i &lt; this.indicators.length; i++) {</span>
<span class="cstat-no" title="statement not covered" >        this.indicators[i].refresh()</span>
      }
    })
&nbsp;
<span class="cstat-no" title="statement not covered" >    if (fade) {</span>
<span class="cstat-no" title="statement not covered" >      this.on('scrollEnd', () =&gt; <span class="fstat-no" title="function not covered" >{</span></span>
<span class="cstat-no" title="statement not covered" >        for (let i = 0; i &lt; this.indicators.length; i++) {</span>
<span class="cstat-no" title="statement not covered" >          this.indicators[i].fade()</span>
        }
      })
&nbsp;
<span class="cstat-no" title="statement not covered" >      this.on('scrollCancel', () =&gt; <span class="fstat-no" title="function not covered" >{</span></span>
<span class="cstat-no" title="statement not covered" >        for (let i = 0; i &lt; this.indicators.length; i++) {</span>
<span class="cstat-no" title="statement not covered" >          this.indicators[i].fade()</span>
        }
      })
&nbsp;
<span class="cstat-no" title="statement not covered" >      this.on('scrollStart', () =&gt; <span class="fstat-no" title="function not covered" >{</span></span>
<span class="cstat-no" title="statement not covered" >        for (let i = 0; i &lt; this.indicators.length; i++) {</span>
<span class="cstat-no" title="statement not covered" >          this.indicators[i].fade(true)</span>
        }
      })
&nbsp;
<span class="cstat-no" title="statement not covered" >      this.on('beforeScrollStart', () =&gt; <span class="fstat-no" title="function not covered" >{</span></span>
<span class="cstat-no" title="statement not covered" >        for (let i = 0; i &lt; this.indicators.length; i++) {</span>
<span class="cstat-no" title="statement not covered" >          this.indicators[i].fade(true, true)</span>
        }
      })
    }
&nbsp;
<span class="cstat-no" title="statement not covered" >    this.on('destroy', () =&gt; <span class="fstat-no" title="function not covered" >{</span></span>
<span class="cstat-no" title="statement not covered" >      this._removeScrollBars()</span>
    })
  }
&nbsp;
  BScroll.prototype._insertScrollBar = function (scrollbar) <span class="fstat-no" title="function not covered" >{</span>
<span class="cstat-no" title="statement not covered" >    this.wrapper.appendChild(scrollbar)</span>
  }
&nbsp;
  BScroll.prototype._removeScrollBars = function () <span class="fstat-no" title="function not covered" >{</span>
<span class="cstat-no" title="statement not covered" >    for (let i = 0; i &lt; this.indicators.length; i++) {</span>
<span class="cstat-no" title="statement not covered" >      this.indicators[i].destroy()</span>
    }
  }
}
&nbsp;
function createScrollbar(direction) <span class="fstat-no" title="function not covered" >{</span>
  let scrollbar = <span class="cstat-no" title="statement not covered" >document.createElement('div')</span>
  let indicator = <span class="cstat-no" title="statement not covered" >document.createElement('div')</span>
&nbsp;
<span class="cstat-no" title="statement not covered" >  scrollbar.style.cssText = 'position:absolute;z-index:9999;pointerEvents:none'</span>
<span class="cstat-no" title="statement not covered" >  indicator.style.cssText = 'box-sizing:border-box;position:absolute;background:rgba(0,0,0,0.5);border:1px solid rgba(255,255,255,0.9);border-radius:3px;'</span>
&nbsp;
<span class="cstat-no" title="statement not covered" >  indicator.className = 'bscroll-indicator'</span>
&nbsp;
<span class="cstat-no" title="statement not covered" >  if (direction === 'horizontal') {</span>
<span class="cstat-no" title="statement not covered" >    scrollbar.style.cssText += ';height:7px;left:2px;right:2px;bottom:0'</span>
<span class="cstat-no" title="statement not covered" >    indicator.style.height = '100%'</span>
<span class="cstat-no" title="statement not covered" >    scrollbar.className = 'bscroll-horizontal-scrollbar'</span>
  } else {
<span class="cstat-no" title="statement not covered" >    scrollbar.style.cssText += ';width:7px;bottom:2px;top:2px;right:1px'</span>
<span class="cstat-no" title="statement not covered" >    indicator.style.width = '100%'</span>
<span class="cstat-no" title="statement not covered" >    scrollbar.className = 'bscroll-vertical-scrollbar'</span>
  }
&nbsp;
<span class="cstat-no" title="statement not covered" >  scrollbar.style.cssText += ';overflow:hidden'</span>
<span class="cstat-no" title="statement not covered" >  scrollbar.appendChild(indicator)</span>
&nbsp;
<span class="cstat-no" title="statement not covered" >  return scrollbar</span>
}
&nbsp;
function Indicator(scroller, options) <span class="fstat-no" title="function not covered" >{</span>
<span class="cstat-no" title="statement not covered" >  this.wrapper = options.el</span>
<span class="cstat-no" title="statement not covered" >  this.wrapperStyle = this.wrapper.style</span>
<span class="cstat-no" title="statement not covered" >  this.indicator = this.wrapper.children[0]</span>
<span class="cstat-no" title="statement not covered" >  this.indicatorStyle = this.indicator.style</span>
<span class="cstat-no" title="statement not covered" >  this.scroller = scroller</span>
<span class="cstat-no" title="statement not covered" >  this.direction = options.direction</span>
<span class="cstat-no" title="statement not covered" >  if (options.fade) {</span>
<span class="cstat-no" title="statement not covered" >    this.visible = 0</span>
<span class="cstat-no" title="statement not covered" >    this.wrapperStyle.opacity = '0'</span>
  } else {
<span class="cstat-no" title="statement not covered" >    this.visible = 1</span>
  }
&nbsp;
<span class="cstat-no" title="statement not covered" >  this.sizeRatioX = 1</span>
<span class="cstat-no" title="statement not covered" >  this.sizeRatioY = 1</span>
<span class="cstat-no" title="statement not covered" >  this.maxPosX = 0</span>
<span class="cstat-no" title="statement not covered" >  this.maxPosY = 0</span>
<span class="cstat-no" title="statement not covered" >  this.x = 0</span>
<span class="cstat-no" title="statement not covered" >  this.y = 0</span>
&nbsp;
<span class="cstat-no" title="statement not covered" >  if (options.interactive) {</span>
<span class="cstat-no" title="statement not covered" >    this._addDOMEvents()</span>
  }
}
&nbsp;
Indicator.prototype.handleEvent = function (e) <span class="fstat-no" title="function not covered" >{</span>
<span class="cstat-no" title="statement not covered" >  switch (e.type) {</span>
    case 'touchstart':
    case 'mousedown':
<span class="cstat-no" title="statement not covered" >      this._start(e)</span>
<span class="cstat-no" title="statement not covered" >      break</span>
    case 'touchmove':
    case 'mousemove':
<span class="cstat-no" title="statement not covered" >      this._move(e)</span>
<span class="cstat-no" title="statement not covered" >      break</span>
    case 'touchend':
    case 'mouseup':
    case 'touchcancel':
    case 'mousecancel':
<span class="cstat-no" title="statement not covered" >      this._end(e)</span>
<span class="cstat-no" title="statement not covered" >      break</span>
  }
}
&nbsp;
Indicator.prototype.refresh = function () <span class="fstat-no" title="function not covered" >{</span>
<span class="cstat-no" title="statement not covered" >  if (this._shouldShow()) {</span>
<span class="cstat-no" title="statement not covered" >    this.transitionTime()</span>
<span class="cstat-no" title="statement not covered" >    this._calculate()</span>
<span class="cstat-no" title="statement not covered" >    this.updatePosition()</span>
  }
}
&nbsp;
Indicator.prototype.fade = function (visible, hold) <span class="fstat-no" title="function not covered" >{</span>
<span class="cstat-no" title="statement not covered" >  if (hold &amp;&amp; !this.visible) {</span>
<span class="cstat-no" title="statement not covered" >    return</span>
  }
&nbsp;
  let time = <span class="cstat-no" title="statement not covered" >visible ? 250 : 500</span>
&nbsp;
<span class="cstat-no" title="statement not covered" >  visible = visible ? '1' : '0'</span>
&nbsp;
<span class="cstat-no" title="statement not covered" >  this.wrapperStyle[style.transitionDuration] = time + 'ms'</span>
&nbsp;
<span class="cstat-no" title="statement not covered" >  clearTimeout(this.fadeTimeout)</span>
<span class="cstat-no" title="statement not covered" >  this.fadeTimeout = setTimeout(() =&gt; <span class="fstat-no" title="function not covered" >{</span></span>
<span class="cstat-no" title="statement not covered" >    this.wrapperStyle.opacity = visible</span>
<span class="cstat-no" title="statement not covered" >    this.visible = +visible</span>
  }, 0)
}
&nbsp;
Indicator.prototype.updatePosition = function () <span class="fstat-no" title="function not covered" >{</span>
<span class="cstat-no" title="statement not covered" >  if (this.direction === 'vertical') {</span>
    let y = <span class="cstat-no" title="statement not covered" >Math.round(this.sizeRatioY * this.scroller.y)</span>
&nbsp;
<span class="cstat-no" title="statement not covered" >    if (y &lt; 0) {</span>
<span class="cstat-no" title="statement not covered" >      this.transitionTime(500)</span>
      const height = <span class="cstat-no" title="statement not covered" >Math.max(this.indicatorHeight + y * 3, INDICATOR_MIN_LEN)</span>
<span class="cstat-no" title="statement not covered" >      this.indicatorStyle.height = `${height}px`</span>
<span class="cstat-no" title="statement not covered" >      y = 0</span>
    } else <span class="cstat-no" title="statement not covered" >if (y &gt; this.maxPosY) {</span>
<span class="cstat-no" title="statement not covered" >      this.transitionTime(500)</span>
      const height = <span class="cstat-no" title="statement not covered" >Math.max(this.indicatorHeight - (y - this.maxPosY) * 3, INDICATOR_MIN_LEN)</span>
<span class="cstat-no" title="statement not covered" >      this.indicatorStyle.height = `${height}px`</span>
<span class="cstat-no" title="statement not covered" >      y = this.maxPosY + this.indicatorHeight - height</span>
    } else {
<span class="cstat-no" title="statement not covered" >      this.indicatorStyle.height = `${this.indicatorHeight}px`</span>
    }
<span class="cstat-no" title="statement not covered" >    this.y = y</span>
&nbsp;
<span class="cstat-no" title="statement not covered" >    if (this.scroller.options.useTransform) {</span>
<span class="cstat-no" title="statement not covered" >      this.indicatorStyle[style.transform] = `translateY(${y}px)${this.scroller.translateZ}`</span>
    } else {
<span class="cstat-no" title="statement not covered" >      this.indicatorStyle.top = `${y}px`</span>
    }
  } else {
    let x = <span class="cstat-no" title="statement not covered" >Math.round(this.sizeRatioX * this.scroller.x)</span>
&nbsp;
<span class="cstat-no" title="statement not covered" >    if (x &lt; 0) {</span>
<span class="cstat-no" title="statement not covered" >      this.transitionTime(500)</span>
      const width = <span class="cstat-no" title="statement not covered" >Math.max(this.indicatorWidth + x * 3, INDICATOR_MIN_LEN)</span>
<span class="cstat-no" title="statement not covered" >      this.indicatorStyle.width = `${width}px`</span>
<span class="cstat-no" title="statement not covered" >      x = 0</span>
    } else <span class="cstat-no" title="statement not covered" >if (x &gt; this.maxPosX) {</span>
<span class="cstat-no" title="statement not covered" >      this.transitionTime(500)</span>
      const width = <span class="cstat-no" title="statement not covered" >Math.max(this.indicatorWidth - (x - this.maxPosX) * 3, INDICATOR_MIN_LEN)</span>
<span class="cstat-no" title="statement not covered" >      this.indicatorStyle.width = `${width}px`</span>
<span class="cstat-no" title="statement not covered" >      x = this.maxPosX + this.indicatorWidth - width</span>
    } else {
<span class="cstat-no" title="statement not covered" >      this.indicatorStyle.width = `${this.indicatorWidth}px`</span>
    }
&nbsp;
<span class="cstat-no" title="statement not covered" >    this.x = x</span>
&nbsp;
<span class="cstat-no" title="statement not covered" >    if (this.scroller.options.useTransform) {</span>
<span class="cstat-no" title="statement not covered" >      this.indicatorStyle[style.transform] = `translateX(${x}px)${this.scroller.translateZ}`</span>
    } else {
<span class="cstat-no" title="statement not covered" >      this.indicatorStyle.left = `${x}px`</span>
    }
  }
}
&nbsp;
Indicator.prototype.transitionTime = function (time = 0) <span class="fstat-no" title="function not covered" >{</span>
<span class="cstat-no" title="statement not covered" >  this.indicatorStyle[style.transitionDuration] = time + 'ms'</span>
}
&nbsp;
Indicator.prototype.transitionTimingFunction = function (easing) <span class="fstat-no" title="function not covered" >{</span>
<span class="cstat-no" title="statement not covered" >  this.indicatorStyle[style.transitionTimingFunction] = easing</span>
}
&nbsp;
Indicator.prototype.destroy = function () <span class="fstat-no" title="function not covered" >{</span>
<span class="cstat-no" title="statement not covered" >  this._removeDOMEvents()</span>
<span class="cstat-no" title="statement not covered" >  this.wrapper.parentNode.removeChild(this.wrapper)</span>
}
&nbsp;
Indicator.prototype._start = function (e) <span class="fstat-no" title="function not covered" >{</span>
  let point = <span class="cstat-no" title="statement not covered" >e.touches ? e.touches[0] : e</span>
&nbsp;
<span class="cstat-no" title="statement not covered" >  e.preventDefault()</span>
<span class="cstat-no" title="statement not covered" >  e.stopPropagation()</span>
&nbsp;
<span class="cstat-no" title="statement not covered" >  this.transitionTime()</span>
&nbsp;
<span class="cstat-no" title="statement not covered" >  this.initiated = true</span>
<span class="cstat-no" title="statement not covered" >  this.moved = false</span>
<span class="cstat-no" title="statement not covered" >  this.lastPointX = point.pageX</span>
<span class="cstat-no" title="statement not covered" >  this.lastPointY = point.pageY</span>
&nbsp;
<span class="cstat-no" title="statement not covered" >  this.startTime = getNow()</span>
&nbsp;
<span class="cstat-no" title="statement not covered" >  this._handleMoveEvents(addEvent)</span>
<span class="cstat-no" title="statement not covered" >  this.scroller.trigger('beforeScrollStart')</span>
}
&nbsp;
Indicator.prototype._move = function (e) <span class="fstat-no" title="function not covered" >{</span>
  let point = <span class="cstat-no" title="statement not covered" >e.touches ? e.touches[0] : e</span>
&nbsp;
<span class="cstat-no" title="statement not covered" >  e.preventDefault()</span>
<span class="cstat-no" title="statement not covered" >  e.stopPropagation()</span>
&nbsp;
<span class="cstat-no" title="statement not covered" >  if (!this.moved) {</span>
<span class="cstat-no" title="statement not covered" >    this.scroller.trigger('scrollStart')</span>
  }
&nbsp;
<span class="cstat-no" title="statement not covered" >  this.moved = true</span>
&nbsp;
  let deltaX = <span class="cstat-no" title="statement not covered" >point.pageX - this.lastPointX</span>
<span class="cstat-no" title="statement not covered" >  this.lastPointX = point.pageX</span>
&nbsp;
  let deltaY = <span class="cstat-no" title="statement not covered" >point.pageY - this.lastPointY</span>
<span class="cstat-no" title="statement not covered" >  this.lastPointY = point.pageY</span>
&nbsp;
  let newX = <span class="cstat-no" title="statement not covered" >this.x + deltaX</span>
  let newY = <span class="cstat-no" title="statement not covered" >this.y + deltaY</span>
&nbsp;
<span class="cstat-no" title="statement not covered" >  this._pos(newX, newY)</span>
}
&nbsp;
Indicator.prototype._end = function (e) <span class="fstat-no" title="function not covered" >{</span>
<span class="cstat-no" title="statement not covered" >  if (!this.initiated) {</span>
<span class="cstat-no" title="statement not covered" >    return</span>
  }
<span class="cstat-no" title="statement not covered" >  this.initiated = false</span>
&nbsp;
<span class="cstat-no" title="statement not covered" >  e.preventDefault()</span>
<span class="cstat-no" title="statement not covered" >  e.stopPropagation()</span>
&nbsp;
<span class="cstat-no" title="statement not covered" >  this._handleMoveEvents(removeEvent)</span>
&nbsp;
  const snapOption = <span class="cstat-no" title="statement not covered" >this.scroller.options.snap</span>
<span class="cstat-no" title="statement not covered" >  if (snapOption) {</span>
    let {speed, easing = ease.bounce} = <span class="cstat-no" title="statement not covered" >snapOption</span>
    let snap = <span class="cstat-no" title="statement not covered" >this.scroller._nearestSnap(this.scroller.x, this.scroller.y)</span>
&nbsp;
    let time = <span class="cstat-no" title="statement not covered" >speed || Math.max(</span>
        Math.max(
          Math.min(Math.abs(this.scroller.x - snap.x), 1000),
          Math.min(Math.abs(this.scroller.y - snap.y), 1000)
        ), 300)
&nbsp;
<span class="cstat-no" title="statement not covered" >    if (this.scroller.x !== snap.x || this.scroller.y !== snap.y) {</span>
<span class="cstat-no" title="statement not covered" >      this.scroller.directionX = 0</span>
<span class="cstat-no" title="statement not covered" >      this.scroller.directionY = 0</span>
<span class="cstat-no" title="statement not covered" >      this.scroller.currentPage = snap</span>
<span class="cstat-no" title="statement not covered" >      this.scroller.scrollTo(snap.x, snap.y, time, easing)</span>
    }
  }
&nbsp;
<span class="cstat-no" title="statement not covered" >  if (this.moved) {</span>
<span class="cstat-no" title="statement not covered" >    this.scroller.trigger('scrollEnd', {</span>
      x: this.scroller.x,
      y: this.scroller.y
    })
  }
}
&nbsp;
Indicator.prototype._pos = function (x, y) <span class="fstat-no" title="function not covered" >{</span>
<span class="cstat-no" title="statement not covered" >  if (x &lt; 0) {</span>
<span class="cstat-no" title="statement not covered" >    x = 0</span>
  } else <span class="cstat-no" title="statement not covered" >if (x &gt; this.maxPosX) {</span>
<span class="cstat-no" title="statement not covered" >    x = this.maxPosX</span>
  }
&nbsp;
<span class="cstat-no" title="statement not covered" >  if (y &lt; 0) {</span>
<span class="cstat-no" title="statement not covered" >    y = 0</span>
  } else <span class="cstat-no" title="statement not covered" >if (y &gt; this.maxPosY) {</span>
<span class="cstat-no" title="statement not covered" >    y = this.maxPosY</span>
  }
&nbsp;
<span class="cstat-no" title="statement not covered" >  x = Math.round(x / this.sizeRatioX)</span>
<span class="cstat-no" title="statement not covered" >  y = Math.round(y / this.sizeRatioY)</span>
&nbsp;
<span class="cstat-no" title="statement not covered" >  this.scroller.scrollTo(x, y)</span>
<span class="cstat-no" title="statement not covered" >  this.scroller.trigger('scroll', {</span>
    x: this.scroller.x,
    y: this.scroller.y
  })
}
&nbsp;
Indicator.prototype._shouldShow = function () <span class="fstat-no" title="function not covered" >{</span>
<span class="cstat-no" title="statement not covered" >  if ((this.direction === 'vertical' &amp;&amp; this.scroller.hasVerticalScroll) || (this.direction === 'horizontal' &amp;&amp; this.scroller.hasHorizontalScroll)) {</span>
<span class="cstat-no" title="statement not covered" >    this.wrapper.style.display = ''</span>
<span class="cstat-no" title="statement not covered" >    return true</span>
  }
<span class="cstat-no" title="statement not covered" >  this.wrapper.style.display = 'none'</span>
<span class="cstat-no" title="statement not covered" >  return false</span>
}
&nbsp;
Indicator.prototype._calculate = function () <span class="fstat-no" title="function not covered" >{</span>
<span class="cstat-no" title="statement not covered" >  if (this.direction === 'vertical') {</span>
    let wrapperHeight = <span class="cstat-no" title="statement not covered" >this.wrapper.clientHeight</span>
<span class="cstat-no" title="statement not covered" >    this.indicatorHeight = Math.max(Math.round(wrapperHeight * wrapperHeight / (this.scroller.scrollerHeight || wrapperHeight || 1)), INDICATOR_MIN_LEN)</span>
<span class="cstat-no" title="statement not covered" >    this.indicatorStyle.height = `${this.indicatorHeight}px`</span>
&nbsp;
<span class="cstat-no" title="statement not covered" >    this.maxPosY = wrapperHeight - this.indicatorHeight</span>
&nbsp;
<span class="cstat-no" title="statement not covered" >    this.sizeRatioY = this.maxPosY / this.scroller.maxScrollY</span>
  } else {
    let wrapperWidth = <span class="cstat-no" title="statement not covered" >this.wrapper.clientWidth</span>
<span class="cstat-no" title="statement not covered" >    this.indicatorWidth = Math.max(Math.round(wrapperWidth * wrapperWidth / (this.scroller.scrollerWidth || wrapperWidth || 1)), INDICATOR_MIN_LEN)</span>
<span class="cstat-no" title="statement not covered" >    this.indicatorStyle.width = `${this.indicatorWidth}px`</span>
&nbsp;
<span class="cstat-no" title="statement not covered" >    this.maxPosX = wrapperWidth - this.indicatorWidth</span>
&nbsp;
<span class="cstat-no" title="statement not covered" >    this.sizeRatioX = this.maxPosX / this.scroller.maxScrollX</span>
  }
}
&nbsp;
Indicator.prototype._addDOMEvents = function () <span class="fstat-no" title="function not covered" >{</span>
  let eventOperation = <span class="cstat-no" title="statement not covered" >addEvent</span>
<span class="cstat-no" title="statement not covered" >  this._handleDOMEvents(eventOperation)</span>
}
&nbsp;
Indicator.prototype._removeDOMEvents = function () <span class="fstat-no" title="function not covered" >{</span>
  let eventOperation = <span class="cstat-no" title="statement not covered" >removeEvent</span>
<span class="cstat-no" title="statement not covered" >  this._handleDOMEvents(eventOperation)</span>
<span class="cstat-no" title="statement not covered" >  this._handleMoveEvents(eventOperation)</span>
}
&nbsp;
Indicator.prototype._handleMoveEvents = function (eventOperation) <span class="fstat-no" title="function not covered" >{</span>
<span class="cstat-no" title="statement not covered" >  if (!this.scroller.options.disableTouch) {</span>
<span class="cstat-no" title="statement not covered" >    eventOperation(window, 'touchmove', this)</span>
  }
<span class="cstat-no" title="statement not covered" >  if (!this.scroller.options.disableMouse) {</span>
<span class="cstat-no" title="statement not covered" >    eventOperation(window, 'mousemove', this)</span>
  }
}
&nbsp;
Indicator.prototype._handleDOMEvents = function (eventOperation) <span class="fstat-no" title="function not covered" >{</span>
<span class="cstat-no" title="statement not covered" >  if (!this.scroller.options.disableTouch) {</span>
<span class="cstat-no" title="statement not covered" >    eventOperation(this.indicator, 'touchstart', this)</span>
<span class="cstat-no" title="statement not covered" >    eventOperation(window, 'touchend', this)</span>
  }
<span class="cstat-no" title="statement not covered" >  if (!this.scroller.options.disableMouse) {</span>
<span class="cstat-no" title="statement not covered" >    eventOperation(this.indicator, 'mousedown', this)</span>
<span class="cstat-no" title="statement not covered" >    eventOperation(window, 'mouseup', this)</span>
  }
}
&nbsp;</pre></td></tr>
</table></pre>
<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
  Code coverage
  generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Mon Apr 15 2019 15:52:39 GMT+0800 (中国标准时间)
</div>
</div>
<script src="../../prettify.js"></script>
<script>
window.onload = function () {
        if (typeof prettyPrint === 'function') {
            prettyPrint();
        }
};
</script>
<script src="../../sorter.js"></script>
</body>
</html>
